<template>
  <div class="container">
    <div class="main">
      <!-- <div class="header">
        <div class="title">数字水运</div>
      </div>  -->
      <div class="content" v-show="!isShow">
        <div class="left-content">
          <div class="item-content" style="margin: 40px;">
            <div class="item-content-title">整体情况-北江船闸</div>
            <div style="display: flex;">
              <div class="item" style="width: 33.33%;margin: 30px 24px 24px 28px;">
                <div class="top">
                  <div class="title">实时水位统计分析</div>
                  <div class="time">时间：{{ new Date().format('yyyy年MM月dd日hh时') }}</div>
                </div>
                <div id="first-chart"></div>
              </div>
              <div class="item" style="width: 33.33%;margin: 30px 24px 24px 0px;">
                <div class="top">
                  <div class="title">过闸船舶货物吨位统计分析</div>
                  <el-date-picker v-model="year" type="year" :clearable="false" value-format="YYYY" @change="yearChange"
                    placeholder="请选择年份" style="width: 100px;" />
                </div>
                <div class="count">
                  <div class="count-item">
                    <span class="name">总上行船舶数（艘）</span>
                    <span class="value">{{ totalUpShipNum }}</span>
                  </div>
                  <div class="count-item">
                    <span class="name">总下行船舶数（艘）</span>
                    <span class="value">{{ totalDownShipNum }}</span>
                  </div>
                </div>
                <div id="second-chart"></div>
              </div>
              <div class="item" style="width: 33.33%;margin: 30px 24px 24px 0px;">
                <div class="top">
                  <div class="title">过闸船舶货物类型统计分析</div>
                  <el-date-picker v-model="date" type="daterange" :clearable="false" value-format="YYYY-MM-DD"
                    range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="dateChange"
                    style="width: 100px;" />
                </div>
                <div id="third-chart"></div>
                <div class="pie-table">
                  <div class="pie-tbody">
                    <div class="pie-tr" v-for="(item,index) in pieChartData" :key="index">
                      <div style="display: flex;align-items: center;width: 40%;">
                        <div class="li" :style="`background:${item.itemStyle?item.itemStyle.color:''}`"></div>
                        <div class="pie-td">{{ item.name }}</div>
                      </div>
                      <div class="pie-td" style="width: 30%;">{{ item.load }}吨</div>
                      <div class="pie-td" style="width: 30%;">{{ item.value }}%</div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="item-content" style="margin: 0px 40px 40px 40px;">
            <div class="item-content-title">
              <div>单个船闸情况</div>
              <el-select v-model="shipLock" @change="shipLockChange()" placeholder="请选择船闸" style="margin-left: 20px;">
                <el-option v-for="item in shipLockOptions" :key="item.name" :label="item.name" :value="item.name" />
              </el-select>
            </div>
            <div style="display: flex;">
              <div class="item" style="width: 50%;margin: 30px 24px 24px 28px;">
                <div class="top" style="justify-content: unset;">
                  <div class="title" :class="currentTab === 1? '' : 'no-active'" @click="currentTab = 1">过闸船舶统计分析</div>
                  <div class="title" :class="currentTab === 2? '' : 'no-active'" @click="currentTab = 2">水位变化统计</div>
                </div>
                <div class="tab-content" v-show="currentTab === 1">
                  <div class="radio-value">
                    <el-radio-group v-model="radioValue" @change="radioValueChange">
                      <el-radio-button label="北江船闸过闸船舶货物吨位统计分析" value="北江船闸过闸船舶货物吨位统计分析" />
                      <el-radio-button label="北江船闸过闸船舶货物类型统计分析" value="北江船闸过闸船舶货物类型统计分析" />
                    </el-radio-group>
                  </div>
                  <div class="count" v-show="radioValue === '北江船闸过闸船舶货物吨位统计分析'">
                    <el-date-picker v-model="year1" type="year" :clearable="false" value-format="YYYY"
                      @change="year1Change" placeholder="请选择年份" style="width: 100px;" />
                    <div class="count-item">
                      <span class="name">总上行船舶数（艘）</span>
                      <span class="value">{{ totalUpShipNum1 }}</span>
                    </div>
                    <div class="count-item">
                      <span class="name">总下行船舶数（艘）</span>
                      <span class="value">{{ totalDownShipNum1 }}</span>
                    </div>
                  </div>
                  <div id="sixth-chart" v-show="radioValue === '北江船闸过闸船舶货物吨位统计分析'"></div>
                  <div class="date" v-show="radioValue === '北江船闸过闸船舶货物类型统计分析'">
                    <el-date-picker v-model="date1" type="daterange" :clearable="false" value-format="YYYY-MM-DD"
                      range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="date1Change"
                      style="width: 200px;" />
                  </div>
                  <div style="display: flex;" v-show="radioValue === '北江船闸过闸船舶货物类型统计分析'">
                    <div id="seventh-chart"></div>
                    <div class="pie-table" style="height: 300px;display: flex;align-items: center;">
                      <div class="pie-tbody" style="width: 300px;">
                        <div class="pie-tr" v-for="(item,index) in pieChartData1" :key="index">
                          <div style="display: flex;align-items: center;width: 40%;">
                            <div class="li" :style="`background:${item.itemStyle?item.itemStyle.color:''}`"></div>
                            <div class="pie-td">{{ item.name }}</div>
                          </div>
                          <div class="pie-td" style="width: 30%;">{{ item.load }}吨</div>
                          <div class="pie-td" style="width: 30%;">{{ item.value }}%</div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
                <div class="tab-content" v-show="currentTab === 2">
                  <div class="date">
                    水位日期：
                    <el-date-picker v-model="waterLevelDate" type="date" value-format="YYYY-MM-DD" :clearable="false"
                      @change="waterLevelDateChange" placeholder="请选择日期" style="width: 140px;" />
                  </div>
                  <div id="eighth-chart"></div>
                </div>
              </div>
              <div class="item" style="width: 50%;margin: 30px 24px 24px 0px;">
                <div class="top">
                  <div class="title">实时视频监控</div>
                  <el-select v-model="videoPoint" @change="videoPointChange" placeholder="请选择视频点">
                    <el-option v-for="item in videoDirectoryData" :key="item.id" :label="item.name" :value="item.id" />
                  </el-select>
                </div>
                <div style="height: 342px;" v-show="videoDirectoryData.length">
                  <video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered"
                    style="object-fit: fill;width: 100%;height: 100%;">
                  </video>
                </div>
                <div class="no-video" style="" v-if="videoDirectoryData.length === 0">
                  <div class="default-img">
                    <img src="../assets/images/big-screen/no-data.png" alt="">
                  </div>
                  <div class="default-text">暂无视频</div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="centre-content">
          <OlArc ref="OlArcRef"></OlArc>
          <div class="special-topic">
            <div class="topic" @click="router.push({ path: '/bigScreenNew' })">数字水运</div>
            <div class="topic-active">闸坝智能调度与安全监测</div>
            <div class="topic" @click="router.push({ path: '/bigScreenQiaoquNew' })">水上桥区管控</div>
            <div class="topic" @click="isShow = true">琼州海峡保畅通系统联动</div>
          </div>
          <div class="legend">
            <div class="legend-item">
              <img src="../assets/images/big-screen/icon-beijiang.png" alt="">
              <div>北江船闸</div>
            </div>
            <div class="legend-item">
              <img src="../assets/images/big-screen/icon-lianjiang.png" alt="">
              <div>连江船闸</div>
            </div>
          </div>
          <div class="filter">
            <div class="filter-item" style="margin: 20px 24px;">
              <!-- <el-checkbox
                v-model="checkAll1"
                :indeterminate="isIndeterminate1"
                @change="handleCheckAllChange1"
              >
                船闸
              </el-checkbox> -->
              <div class="name">船闸</div>
              <el-checkbox-group v-model="checkedValues1" @change="handleCheckedCitiesChange1"
                style="display: flex;flex-direction: column;margin-left: 20px;">
                <el-checkbox v-for="item in options1" :key="item" :label="item" :value="item">
                  {{ item }}
                </el-checkbox>
              </el-checkbox-group>
            </div>
            <div class="filter-item" style="margin: 0px 24px 20px 24px;">
              <!-- <el-checkbox
                v-model="checkAll2"
                :indeterminate="isIndeterminate2"
                @change="handleCheckAllChange2"
              >
                航道
              </el-checkbox> -->
              <div class="name">航道</div>
              <el-checkbox-group v-model="checkedValues2" @change="handleCheckedCitiesChange2"
                style="display: flex;flex-direction: column;margin-left: 20px;">
                <el-checkbox v-for="item in options2" :key="item" :label="item" :value="item">
                  {{ item }}
                </el-checkbox>
              </el-checkbox-group>
            </div>
            <div class="filter-item" style="margin: 0px 24px 20px 24px;">
              <!-- <el-checkbox
                v-model="checkAll3"
                :indeterminate="isIndeterminate3"
                @change="handleCheckAllChange3"
              >
                辖区
              </el-checkbox> -->
              <div class="name">辖区</div>
              <el-checkbox-group v-model="checkedValues3" @change="handleCheckedCitiesChange3"
                style="display: flex;flex-direction: column;margin-left: 20px;">
                <el-checkbox v-for="item in options3" :key="item" :label="item" :value="item">
                  {{ item }}
                </el-checkbox>
              </el-checkbox-group>
            </div>
          </div>
          <div class="statistics">
            <div class="statistics-item" style="margin-bottom: 16px;">
              <div class="top-info">北江船闸数，共<span style="color: #78DFFF;">{{ beijiangData.totalNum }}</span>个</div>
              <div class="bottom-info">
                <div style="margin-right: 62px;">
                  <div>Ⅲ级</div>
                  <div class="value">{{ beijiangData.three }}</div>
                </div>
                <div style="margin-right: 62px;">
                  <div>Ⅳ级</div>
                  <div class="value">{{ beijiangData.four }}</div>
                </div>
                <div>
                  <div>Ⅴ级</div>
                  <div class="value">{{ beijiangData.five }}</div>
                </div>
              </div>
            </div>
            <div class="statistics-item">
              <div class="top-info">连江船闸数，共<span style="color: #78DFFF;">{{ lianjiangData.totalNum }}</span>个</div>
              <div class="bottom-info">
                <div style="margin-right: 62px;">
                  <div>Ⅳ级</div>
                  <div class="value">{{ lianjiangData.four }}</div>
                </div>
                <div>
                  <div>Ⅵ级</div>
                  <div class="value">{{ lianjiangData.six }}</div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="right-content">
          <div class="item-content" style="margin: 40px;">
            <div class="item-content-title">整体情况-连江闸坝</div>
            <div style="display: flex;">
              <div class="item" style="margin: 30px 24px 24px 28px;">
                <div class="top">
                  <div class="title">变形监测统计分析</div>
                </div>
                <div class="list">
                  <div v-for="(item,index) in deformationData" :key="index" class="list-item">
                    <div class="item-title">{{ item.name }}</div>
                    <div class="item-name">
                      <div>预警数</div>
                      <div>一级</div>
                      <div>二级</div>
                      <div>三级</div>
                    </div>
                    <div class="item-value">
                      <div>{{ item.totalnum }}</div>
                      <div>{{ item.onelevel }}</div>
                      <div>{{ item.twolevel }}</div>
                      <div>{{ item.threelevel }}</div>
                    </div>
                  </div>
                </div>
              </div>
              <div class="item" style="margin: 30px 24px 24px 0px;">
                <div class="top">
                  <div class="title">
                    变形监测观测周期统计分析
                    <el-tooltip effect="dark" content="说明：黄牛、黄燕、青莲、青霜水坝观测周期从2023年7月起观测周期从2月一次调整为8小时一次"
                      placement="right">
                      <img src="../assets/images/big-screen/tips.png" alt="">
                    </el-tooltip>
                  </div>
                </div>
                <div class="tabs-content">
                  <div class="radio-tab">
                    <el-radio-group v-model="radio" @change="radioChange">
                      <el-radio-button label="船闸" value="船闸" />
                      <el-radio-button label="水坝" value="水坝" />
                    </el-radio-group>
                  </div>
                  <div id="fourth-chart" v-show="radio === '船闸'"></div>
                  <div id="fifth-chart" v-show="radio === '水坝'"></div>
                </div>
              </div>
            </div>
          </div>
          <div class="item-content" style="margin: 0px 40px 40px 40px;">
            <div class="item-content-title">
              <div>单个闸坝情况</div>
              <el-cascader v-model="shipLock1" :options="shipLockOptions1" :show-all-levels="false"
                @change="shipLock1Change" style="margin-left: 20px;" />
            </div>
            <div style="display: flex;">
              <div class="item" style="margin: 30px 24px 24px 28px;">
                <div class="top">
                  <div class="title">变形监测分析</div>
                  <el-radio-group v-model="radio1" @change="radio1Change">
                    <el-radio-button label="监测点数据分析" value="监测点数据分析" />
                    <el-radio-button label="变形监测统计分析" value="变形监测统计分析" />
                    <el-radio-button label="变形监测观测周期统计" value="变形监测观测周期统计" />
                  </el-radio-group>
                </div>
                <div class="tabs-content" style="height: 342px;">
                  <div class="point-statistics" v-show="radio1 === '监测点数据分析'">
                    <div style="display: flex;margin-bottom: 24px;">
                      <div class="point-item h195 mr24">
                        <div class="top-part">
                          <img src="../assets/images/big-screen/point-one.png" alt="">
                          <div class="ml16">上月水坝单周期最大变形量</div>
                        </div>
                        <div class="bottom-part">
                          <div class="mr60">
                            <div class="name">平面(mm)</div>
                            <div class="value">{{ defInfoData && defInfoData.plane? `${defInfoData.plane}` : '--' }}
                            </div>
                          </div>
                          <div>
                            <div class="name">高程(mm)</div>
                            <div class="value">
                              {{ defInfoData && defInfoData.elevation? `${defInfoData.elevation}` : '--' }}</div>
                          </div>
                        </div>
                      </div>
                      <div class="point-item h195">
                        <div class="top-part">
                          <img src="../assets/images/big-screen/point-two.png" alt="">
                          <div class="ml16">上月水坝累计变形量</div>
                        </div>
                        <div class="bottom-part">
                          <div class="mr60">
                            <div class="name">水平方向(mm)</div>
                            <div class="value">
                              {{ defInfoData && defInfoData.lastMonthpm? `＜${defInfoData.lastMonthpm}` : "--" }}</div>
                          </div>
                          <div>
                            <div class="name">垂直方向(mm)</div>
                            <div class="value">
                              {{ defInfoData && defInfoData.lastMonthgc? `＜${defInfoData.lastMonthgc}` : "--" }}</div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div style="display: flex;">
                      <div class="point-item h125 mr24">
                        <div class="top-part">
                          <img src="../assets/images/big-screen/point-three.png" alt="">
                          <div class="ml16">水坝变形监测点数量(个)</div>
                          <div class="value" style="margin-left: 4px;">
                            {{ defInfoData && defInfoData.pointNum? `${defInfoData.pointNum}` : '--' }}</div>
                        </div>
                      </div>
                      <div class="point-item h125">
                        <div class="top-part">
                          <img src="../assets/images/big-screen/point-four.png" alt="">
                          <div class="ml16">水坝测站布置情况</div>
                          <div class="name">{{ defInfoData && defInfoData.arrangeSit || '--' }}</div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div class="analysis" v-show="radio1 === '变形监测统计分析'">
                    <div class="top-part">
                      <div class="btn-group">
                        <div class="btn" :class="currentActive === 1? 'active' : ''" @click="currentActiveChange(1)"
                          style="margin-right: 10px;">多点单周期图2</div>
                        <div class="btn" :class="currentActive === 2? 'active' : ''" @click="currentActiveChange(2)">
                          单点多周期图3</div>
                      </div>
                      <template v-if="currentActive === 1">
                        <el-input v-model="cycle1" disabled style="width: 100px;margin-right: 10px;" />
                        <el-select v-model="cycle" @change="cycleChange" placeholder="选择周期" style="width: 100px;">
                          <el-option v-for="item in cycleOptions" :key="item.cycName" :label="item.cycName"
                            :value="item.cycName" />
                        </el-select>
                        <div class="my-btn">
                          <div class="btn" :class="currentType1 === '本次'? 'active' : ''" @click="changeType1('本次')">本次
                          </div>
                          <div class="btn" :class="currentType1 === '累积'? 'active' : ''" @click="changeType1('累积')">累积
                          </div>
                        </div>
                      </template>
                      <template v-if="currentActive === 2">
                        <el-select v-model="pointName" placeholder="请选择点" @change="singleValueChange"
                          style="width: 80px;margin-right: 10px;">
                          <el-option v-for="item in pointNameData" :key="item.value" :label="item.text"
                            :value="item.value" />
                        </el-select>
                        <el-select v-model="singleType" placeholder="请选择类型" @change="singleValueChange"
                          style="width: 80px;margin-right: 10px;">
                          <el-option v-for="item in singleTypeData" :key="item.value" :label="item.text"
                            :value="item.value" />
                        </el-select>
                        <el-select v-model="singleValue1" placeholder="选择周期" v-if="singleType === '周期'"
                          @change="singleValueChange" style="width: 100px;margin-right: 10px;">
                          <el-option v-for="item in cycleOptions" :key="item.cycName" :label="item.cycName"
                            :value="item.cycName" />
                        </el-select>
                        <el-select v-model="singleValue2" placeholder="选择周期" v-if="singleType === '周期'"
                          @change="singleValueChange" style="width: 100px;">
                          <el-option v-for="item in cycleOptions" :key="item.cycName" :label="item.cycName"
                            :value="item.cycName" />
                        </el-select>
                        <el-date-picker v-model="singleTime" type="daterange" :clearable="false"
                          value-format="YYYY-MM-DD" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
                          @change="singleValueChange" style="width: 180px;" v-if="singleType === '时间'" />
                        <div class="my-btn">
                          <div class="btn" :class="currentType2 === '本次'? 'active' : ''" @click="changeType2('本次')">本次
                          </div>
                          <div class="btn" :class="currentType2 === '累积'? 'active' : ''" @click="changeType2('累积')">累积
                          </div>
                        </div>
                      </template>
                    </div>
                    <div id="ninth-chart" style="height: 300px;width: 960px;margin-top: 16px;"></div>
                  </div>
                  <div id="tenth-chart" v-show="radio1 === '变形监测观测周期统计'"></div>
                </div>
              </div>
              <div class="item" style="margin: 30px 24px 24px 0px;">
                <div class="top">
                  <div class="title">实时视频监控</div>
                  <el-select v-model="videoPoint1" @change="videoPointChange1" placeholder="请选择视频点">
                    <el-option v-for="item in videoDirectoryData1" :key="item.id" :label="item.name" :value="item.id" />
                  </el-select>
                </div>
                <div class="video" style="height: 342px;" v-show="videoDirectoryData1.length">
                  <video id="myVideo1" class="video-js vjs-default-skin vjs-big-play-centered"
                    style="object-fit: fill;width: 100%;height: 100%;">
                  </video>
                </div>
                <div class="no-video" style="" v-if="videoDirectoryData1.length === 0">
                  <div class="default-img">
                    <img src="../assets/images/big-screen/no-data.png" alt="">
                  </div>
                  <div class="default-text">暂无视频</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="my-iframe" v-if="isShow">
        <iframe src="http://210.76.76.41/digital-port/big-screen/main/#/QZHX?token=e49f977c-4203-464a-92d1-50de3c1f34a5"
          width="5760" height="1200"></iframe>
        <div class="close-btn" @click="isShow = false">返回</div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted, nextTick } from 'vue';
import { useRouter } from "vue-router";
const router = useRouter();

import * as echarts from 'echarts/core';
import { TooltipComponent, LegendComponent, GridComponent, DataZoomComponent, GraphicComponent } from 'echarts/components';
import { PieChart, BarChart, LineChart } from 'echarts/charts';
import { CanvasRenderer } from 'echarts/renderers';

echarts.use([TooltipComponent, LegendComponent, GridComponent, DataZoomComponent, GraphicComponent, PieChart, BarChart, LineChart, CanvasRenderer]);

import videojs from 'video.js';
import 'video.js/dist/video-js.css';
import VideojsZhcnLanguage from 'video.js/dist/lang/zh-CN.json';
videojs.addLanguage('zh-CN', VideojsZhcnLanguage);

//地图
import OlArc from "../components/olArcBigScreen.vue";
const OlArcRef = ref(null);

import chartBg from '../assets/images/big-screen/chart-bg.png';

//引入接口
import {
  newWater, //实时水位统计分析
  goodsTonAlys, //过闸船舶货物吨位统计分析
  goodsAnalysis, //过闸船舶货物类型统计分析
  defAlySmall, //变形监测统计分析
  circleAlys, //变形监测观测周期统计分析
  getShipLock, //获取船闸（北江）
  waterAlys, //水位变化统计
  getShipLockSmall, //获取船闸（连江）
  defInfo, //监测点数据分析
  cycleStatis, //变形监测观测周期统计
  screenMapData, //基本情况
  videoDirectory, //获取视频点
  geVideotUrl, //获取视频URL
  getCycList, //获取周期
  defAyls, //多点单周期图
  defSingleAyls, //单点多周期图
} from "@/bridge-h5/utils/myapi";

//实时水位
const newWaterFunctin = () => {
  nextTick(() => {
    newWater().then((res) => {
      if (res.code === 200) {
        let xAxisData = [];
        let seriesData = [];
        res.data.forEach((item) => {
          xAxisData.push(item.name);
          seriesData.push(item.waterLevel);
        });
        let lineChart = echarts.getInstanceByDom(document.getElementById("first-chart"));
        if (lineChart != null && lineChart != "" && lineChart != undefined) {
          lineChart.dispose();
        }
        lineChart = echarts.init(document.getElementById('first-chart'));

        let option;
        option = {
          tooltip: {
            trigger: 'axis',
            confine: true, //限制在图表区域内
            formatter: function (params) {
              let template = `${params[0].axisValue}<br>`;
              for (let i = 0; i < params.length; i++) {
                let item = params[i];
                template += item.marker + '水位值: ' + item.value + 'm' + '<br>'
              }
              return template
            },
          },
          grid: {
            top: '40px',
            left: '40px',
            right: '15px',
            bottom: '40px',
          },
          dataZoom: [
            {
              show: false,
              type: "inside",
              // maxValueSpan: 8,
              // startValue: 0,
              // endValue: 6,
              zoomLock: false,
            },
          ],
          xAxis: {
            type: 'category',
            axisLabel: {
              // rotate: 60,
              color: "#FFFFFF",
              fontSize: "16px",
            },
            data: xAxisData,
          },
          yAxis: {
            type: 'value',
            name: '水位（m）',
            nameTextStyle: {
              fontWeight: "500",
              fontSize: "16px",
              color: "#FFFFFF",
            },
            axisLabel: {
              color: "#FFFFFF",
              fontSize: "16px",
            },
            splitLine: {
              show: true,
              lineStyle: {
                // type:'dashed',
                color: 'rgba(255,255,255,0.2)'
              }
            }
          },
          series: [
            {
              data: seriesData,
              type: 'line',
              itemStyle: {
                color: '#78DFFF'
              },
            }
          ]
        };
        option && lineChart.setOption(option);
      }
    });
  });
};

//过闸船舶货物吨位统计
const year = ref(new Date().format("yyyy"));
const totalUpShipNum = ref(0);
const totalDownShipNum = ref(0);
const initStackedChart = () => {
  goodsTonAlys(
    "",
    `${year.value}-01-01`,
    `${year.value}-12-31`
  ).then((res) => {
    if (res.code === 200 && res.data) {
      totalUpShipNum.value = res.data.totalUpShipNum;
      totalDownShipNum.value = res.data.totalDownShipNum;
      let emptyData = [];
      let num1Data = [];
      let num2Data = [];
      let num3Data = [];
      let num4Data = [];
      let upShipNumData = [];
      let downShipNumData = [];
      res.data.tons.forEach((item) => {
        emptyData.push(item.empty);
        num1Data.push(item.num1);
        num2Data.push(item.num2);
        num3Data.push(item.num3);
        num4Data.push(item.num4);
        upShipNumData.push(item.upShipNum);
        downShipNumData.push(item.downShipNum);
      });

      let stackedChart = echarts.getInstanceByDom(document.getElementById("second-chart"));
      if (stackedChart != null && stackedChart != "" && stackedChart != undefined) {
        stackedChart.dispose();
      }
      stackedChart = echarts.init(document.getElementById('second-chart'));
      let option;
      option = {
        tooltip: {
          trigger: 'axis',
          confine: true, //限制在图表区域内 
          formatter: (params) => {
            let template = `<b>${params[0].axisValue}</b><br>` + `上行船舶数<b style="float:right;padding-left: 20px;">${upShipNumData[parseInt(params[0].axisValue.split('月')[0]) - 1]}艘</b><br>下行船舶数<b style="float:right;padding-left: 20px;">${downShipNumData[parseInt(params[0].axisValue.split('月')[0]) - 1]}艘</b><br>`;
            let count = 0;
            for (let i = 0; i < params.length; i++) {
              let item = params[i];
              template += item.marker + item.seriesName + `<b style="float:right;padding-left: 20px;">${item.value}艘</b><br>`;
              count += item.value;
            }
            return template + `<b style="position: absolute;top: 10px; right: 10px;">总共：${count}艘</b>`;
          },
        },
        legend: {
          type: 'scroll',
          textStyle: {
            fontSize: "16px",
            color: "#FFFFFF",
          },
          pageIconColor: '#FFFFFF', // 翻页按钮的颜色
          pageIconInactiveColor: '#2f4554', // 翻页按钮不激活时（即翻页到头时）的颜色
          pageTextStyle: { // 图例页信息的文字样式
            color: '#FFFFFF'
          },
        },
        grid: {
          top: '60px',
          left: '80px',
          right: '20px',
          bottom: '30px',
        },
        xAxis: [
          {
            type: 'category',
            axisLabel: {
              interval: 0,
              color: "#FFFFFF",
              fontSize: "16px",
            },
            data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
          }
        ],
        yAxis: [
          {
            type: 'value',
            name: '船舶数（艘）',
            axisLabel: {
              interval: 0,
              color: "#FFFFFF",
              fontSize: "16px",
            },
            nameTextStyle: {
              fontWeight: "500",
              fontSize: "16px",
              color: "#FFFFFF",
            },
            splitLine: {
              show: true,
              lineStyle: {
                // type:'dashed',
                color: 'rgba(255,255,255,0.2)'
              }
            }
          }
        ],
        series: [
          {
            name: '空载',
            type: 'bar',
            stack: 'Search Engine',
            barWidth: "15%",
            // showBackground: true,
            emphasis: {
              //折线图的高亮状态。
              focus: 'series'
            },
            itemStyle: {
              color: '#78DFFF'
            },
            data: emptyData,
          },
          {
            name: '0-500吨',
            type: 'bar',
            stack: 'Search Engine',
            barWidth: "15%",
            // showBackground: true,
            emphasis: {
              focus: 'series'
            },
            itemStyle: {
              color: '#309CFF'
            },
            data: num1Data
          },
          {
            name: '500-1000吨',
            type: 'bar',
            stack: 'Search Engine',
            barWidth: "15%",
            // showBackground: true,
            emphasis: {
              focus: 'series'
            },
            itemStyle: {
              color: '#5AF5D5'
            },
            data: num2Data
          },
          {
            name: '1000-3000吨',
            type: 'bar',
            stack: 'Search Engine',
            barWidth: "15%",
            // showBackground: true,
            emphasis: {
              focus: 'series'
            },
            itemStyle: {
              color: '#FFC733'
            },
            data: num3Data
          },
          {
            name: '3000吨以上',
            type: 'bar',
            stack: 'Search Engine',
            barWidth: "15%",
            // showBackground: true,
            emphasis: {
              focus: 'series'
            },
            itemStyle: {
              color: '#FE772A'
            },
            data: num4Data
          }
        ]
      };

      option && stackedChart.setOption(option);
    }
  });
};
const yearChange = () => {
  initStackedChart();
};

//过闸船舶货物类型统计分析
// 计算7天前的时间
const sevenDaysAgo = new Date(new Date().getTime() - 6 * 24 * 60 * 60 * 1000);
const sevenDaysAgoFormatted = ref(`${sevenDaysAgo.getFullYear()}-${(sevenDaysAgo.getMonth() + 1).toString().padStart(2, '0')}-${sevenDaysAgo.getDate().toString().padStart(2, '0')}`);
const date = ref([sevenDaysAgoFormatted.value, new Date().format("yyyy-MM-dd")]);
const pieChartData = ref([]);
const initPieChart = () => {
  let start = date.value[0];
  let end = date.value[1];
  goodsAnalysis("", start, end).then((res) => {
    if (res.code === 200) {
      let seriesData = [];
      let colorData = [
        '#78DFFF', '#9AD4EF', '#309CFF', '#2B679D', '#5057FD', '#8083D8', '#5AF5D5', '#A6E7D9', '#55FE5C', '#9CDB9F',
        '#FFC733', '#FFE6A5', '#FE762A', '#F9B793', '#E33F3F', '#F48787', '#ED44F0', '#F5ABF6', '#41616A', '#ADCDD6',
      ];
      res.data.forEach((item, index) => {
        let obj = {
          name: item.cargoType,
          value: item.rate,
          load: item.load,
          itemStyle: {
            color: colorData[index]
          }
        };
        seriesData.push(obj);
      });
      pieChartData.value = seriesData;
      let pieChart = echarts.getInstanceByDom(document.getElementById("third-chart"));
      if (pieChart != null && pieChart != "" && pieChart != undefined) {
        pieChart.dispose();
      }
      pieChart = echarts.init(document.getElementById('third-chart'));
      let option;
      option = {
        graphic: {
          type: 'image',
          id: 'background',
          left: 240,
          top: 15,
          z: -10, // 确保背景图在底层
          bounding: 'raw',
          origin: [200, 200], // 图片的中心位置
          style: {
            image: chartBg, // 背景图片的URL
            width: 190, // 背景图片的宽度
            height: 190, // 背景图片的高度
          }
        },
        tooltip: {
          trigger: 'item',
          confine: true, //限制在图表区域内
          formatter: function (params) {
            return params.marker + params.data.name + ': ' + params.data.load + '吨，占比：' + params.data.value + '%'
          },
        },
        legend: {
          type: 'scroll',
          textStyle: {
            fontSize: "16px",
            color: "#FFFFFF",
          },
          pageIconColor: '#FFFFFF', // 翻页按钮的颜色
          pageIconInactiveColor: '#2f4554', // 翻页按钮不激活时（即翻页到头时）的颜色
          pageTextStyle: { // 图例页信息的文字样式
            color: '#FFFFFF'
          },
        },
        series: [
          {
            type: 'pie',
            radius: ['60%', '70%'],
            avoidLabelOverlap: false,
            label: {
              show: false,
            },
            labelLine: {
              show: true, //标签连接线
            },
            data: seriesData
          }
        ],
      };
      option && pieChart.setOption(option);
    }
  });
};
const dateChange = () => {
  initPieChart();
};

//变形监测统计分析
const deformationData = ref([]);
const deformationAlysFunction = () => {
  defAlySmall().then((res) => {
    if (res.code === 200 && res.data.length) {
      deformationData.value = res.data;
    }
  });
};

//变形监测观测周期统计分析
const radio = ref('船闸');
const radioChange = () => {
  if (radio.value === '船闸') {
    initBarChart1();
  } else if (radio.value === '水坝') {
    initBarChart2();
  }
};
const chuanzhaxAxisData = ref([]);
const chuanzhaseriesData = ref([]);
const shuibaxAxisData = ref([]);
const shuibaseriesData = ref([]);
const circleAlysFunction = () => {
  circleAlys().then((res) => {
    if (res.code === 200) {
      res.data.chuanzha.forEach((item) => {
        chuanzhaxAxisData.value.push(item.name);
        chuanzhaseriesData.value.push({
          value: item.cyc,
          itemStyle: {
            color: '#78DFFF'
          }
        })
      });
      res.data.shuiba.forEach((item) => {
        shuibaxAxisData.value.push(item.name);
        shuibaseriesData.value.push({
          value: item.cyc,
          itemStyle: {
            color: '#78DFFF'
          }
        })
      });
      initBarChart1();
      initBarChart2();
    }
  });
};
const initBarChart1 = () => {
  nextTick(() => {
    let barChart = echarts.getInstanceByDom(document.getElementById("fourth-chart"));
    if (barChart != null && barChart != "" && barChart != undefined) {
      barChart.dispose();
    }
    barChart = echarts.init(document.getElementById('fourth-chart'));
    let option;
    option = {
      tooltip: {
        trigger: 'axis',
        confine: true, //限制在图表区域内
        formatter: function (params) {
          let template = `${params[0].axisValue}<br>`;
          for (let i = 0; i < params.length; i++) {
            let item = params[i];
            template += item.marker + ' ' + item.data.value + ' 次' + '<br>'
          }
          return template
        },
      },
      legend: {},
      grid: {
        top: '40px',
        left: '40px',
        right: '15px',
        bottom: '40px',
      },
      dataZoom: [
        {
          show: false,
          type: "inside",
          // maxValueSpan: 8,
          startValue: 0,
          endValue: 4,
          zoomLock: false,
        },
      ],
      xAxis: {
        type: 'category',
        axisLabel: {
          // rotate: 60,
          color: "#FFFFFF",
          fontSize: "16px",
        },
        data: chuanzhaxAxisData.value,
      },
      yAxis: {
        type: 'value',
        name: '统计次数',
        nameTextStyle: {
          fontWeight: "500",
          fontSize: "16px",
          color: "#FFFFFF",
        },
        axisLabel: {
          color: "#FFFFFF",
          fontSize: "16px",
        },
        splitLine: {
          show: true,
          lineStyle: {
            // type:'dashed',
            color: 'rgba(255,255,255,0.2)'
          }
        }
      },
      series: [
        {
          type: 'bar',
          barWidth: "15%",
          // showBackground: true,
          data: chuanzhaseriesData.value
        }
      ]
    };

    option && barChart.setOption(option);
  });
};
const initBarChart2 = () => {
  nextTick(() => {
    let barChart = echarts.getInstanceByDom(document.getElementById("fifth-chart"));
    if (barChart != null && barChart != "" && barChart != undefined) {
      barChart.dispose();
    }
    barChart = echarts.init(document.getElementById('fifth-chart'));
    let option;
    option = {
      tooltip: {
        trigger: 'axis',
        confine: true, //限制在图表区域内
        formatter: function (params) {
          let template = `${params[0].axisValue}<br>`;
          for (let i = 0; i < params.length; i++) {
            let item = params[i];
            template += item.marker + ' ' + item.data.value + ' 次' + '<br>'
          }
          return template
        },
      },
      legend: {},
      grid: {
        top: '40px',
        left: '60px',
        right: '15px',
        bottom: '40px',
      },
      dataZoom: [
        {
          show: false,
          type: "inside",
          // maxValueSpan: 8,
          startValue: 0,
          endValue: 4,
          zoomLock: false,
        },
      ],
      xAxis: {
        type: 'category',
        axisLabel: {
          color: "#FFFFFF",
          fontSize: "16px",
        },
        data: shuibaxAxisData.value,
      },
      yAxis: {
        type: 'value',
        name: '统计次数',
        nameTextStyle: {
          fontWeight: "500",
          fontSize: "16px",
          color: "#FFFFFF",
        },
        axisLabel: {
          color: "#FFFFFF",
          fontSize: "16px",
        },
        splitLine: {
          show: true,
          lineStyle: {
            // type:'dashed',
            color: 'rgba(255,255,255,0.2)'
          }
        }
      },
      series: [
        {
          type: 'bar',
          barWidth: "15%",
          // showBackground: true,
          data: shuibaseriesData.value
        }
      ]
    };

    option && barChart.setOption(option);
  });
};

//获取船闸（北江）
const shipLock = ref('');
const shipLockOptions = ref([]);
const getShipLockFunction = () => {
  getShipLock("北江").then((res) => {
    if (res.code === 200 && res.data.length) {
      shipLockOptions.value = res.data;
      shipLock.value = res.data[1].name;
      initStackedChart1();
      initPieChart1();
      waterAlysFunction();
      initVideo(); //视频监控
    }
  });
};
const shipLockChange = () => {
  initStackedChart1();
  initPieChart1();
  waterAlysFunction();
  videoDirectoryFunction(); //视频监控
};
const currentTab = ref(1);

//过闸船舶统计分析
const radioValue = ref('北江船闸过闸船舶货物吨位统计分析');
const radioValueChange = () => {

};
//过闸船舶货物吨位统计
const year1 = ref(new Date().format("yyyy"));
const totalUpShipNum1 = ref(0);
const totalDownShipNum1 = ref(0);
const initStackedChart1 = () => {
  goodsTonAlys(
    shipLock.value,
    `${year1.value}-01-01`,
    `${year1.value}-12-31`
  ).then((res) => {
    if (res.code === 200 && res.data) {
      totalUpShipNum1.value = res.data.totalUpShipNum;
      totalDownShipNum1.value = res.data.totalDownShipNum;
      let emptyData = [];
      let num1Data = [];
      let num2Data = [];
      let num3Data = [];
      let num4Data = [];
      let upShipNumData = [];
      let downShipNumData = [];
      res.data.tons.forEach((item) => {
        emptyData.push(item.empty);
        num1Data.push(item.num1);
        num2Data.push(item.num2);
        num3Data.push(item.num3);
        num4Data.push(item.num4);
        upShipNumData.push(item.upShipNum);
        downShipNumData.push(item.downShipNum);
      });

      nextTick(() => {
        let stackedChart = echarts.getInstanceByDom(document.getElementById("sixth-chart"));
        if (stackedChart != null && stackedChart != "" && stackedChart != undefined) {
          stackedChart.dispose();
        }
        stackedChart = echarts.init(document.getElementById('sixth-chart'));
        let option;
        option = {
          tooltip: {
            trigger: 'axis',
            confine: true, //限制在图表区域内
            formatter: (params) => {
              // console.log(params)
              let template = `<b>${params[0].axisValue}</b><br>` + `上行船舶数<b style="float:right;padding-left: 20px;">${upShipNumData[parseInt(params[0].axisValue.split('月')[0]) - 1]}艘</b><br>下行船舶数<b style="float:right;padding-left: 20px;">${downShipNumData[parseInt(params[0].axisValue.split('月')[0]) - 1]}艘</b><br>`;
              let count = 0;
              for (let i = 0; i < params.length; i++) {
                let item = params[i];
                template += item.marker + item.seriesName + `<b style="float:right;padding-left: 20px;">${item.value}艘</b><br>`;
                count += item.value;
              }
              return template + `<b style="position: absolute;top: 10px; right: 10px;">总共：${count}艘</b>`;
            },
          },
          legend: {
            type: 'scroll',
            textStyle: {
              fontSize: "16px",
              color: "#FFFFFF",
            },
          },
          grid: {
            top: '60px',
            left: '50px',
            right: '20px',
            bottom: '30px',
          },
          xAxis: [
            {
              type: 'category',
              axisLabel: {
                interval: 0,
                color: "#FFFFFF",
                fontSize: "16px",
              },
              data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
            }
          ],
          yAxis: [
            {
              type: 'value',
              name: '船舶数（艘）',
              axisLabel: {
                interval: 0,
                color: "#FFFFFF",
                fontSize: "16px",
              },
              nameTextStyle: {
                fontWeight: "500",
                fontSize: "16px",
                color: "#FFFFFF",
              },
              splitLine: {
                show: true,
                lineStyle: {
                  // type:'dashed',
                  color: 'rgba(255,255,255,0.2)'
                }
              }
            }
          ],
          series: [
            {
              name: '空载',
              type: 'bar',
              stack: 'Search Engine',
              barWidth: "15%",
              // showBackground: true,
              emphasis: {
                //折线图的高亮状态。
                focus: 'series'
              },
              itemStyle: {
                color: '#78DFFF'
              },
              data: emptyData,
            },
            {
              name: '0-500吨',
              type: 'bar',
              stack: 'Search Engine',
              barWidth: "15%",
              // showBackground: true,
              emphasis: {
                focus: 'series'
              },
              itemStyle: {
                color: '#309CFF'
              },
              data: num1Data
            },
            {
              name: '500-1000吨',
              type: 'bar',
              stack: 'Search Engine',
              barWidth: "15%",
              // showBackground: true,
              emphasis: {
                focus: 'series'
              },
              itemStyle: {
                color: '#5AF5D5'
              },
              data: num2Data
            },
            {
              name: '1000-3000吨',
              type: 'bar',
              stack: 'Search Engine',
              barWidth: "15%",
              // showBackground: true,
              emphasis: {
                focus: 'series'
              },
              itemStyle: {
                color: '#FFC733'
              },
              data: num3Data
            },
            {
              name: '3000吨以上',
              type: 'bar',
              stack: 'Search Engine',
              barWidth: "15%",
              // showBackground: true,
              emphasis: {
                focus: 'series'
              },
              itemStyle: {
                color: '#FE772A'
              },
              data: num4Data
            }
          ]
        };

        option && stackedChart.setOption(option);
      });
    }
  });
};
const year1Change = () => {
  initStackedChart1();
};
const sevenDaysAgoFormatted1 = ref(`${sevenDaysAgo.getFullYear()}-${(sevenDaysAgo.getMonth() + 1).toString().padStart(2, '0')}-${sevenDaysAgo.getDate().toString().padStart(2, '0')}`);
const date1 = ref([sevenDaysAgoFormatted1.value, new Date().format("yyyy-MM-dd")]);
const pieChartData1 = ref([]);
const initPieChart1 = () => {
  let start = date1.value[0];
  let end = date1.value[1];
  goodsAnalysis(shipLock.value, start, end).then((res) => {
    if (res.code === 200) {
      let seriesData = [];
      let colorData = [
        '#78DFFF', '#9AD4EF', '#309CFF', '#2B679D', '#5057FD', '#8083D8', '#5AF5D5', '#A6E7D9', '#55FE5C', '#9CDB9F',
        '#FFC733', '#FFE6A5', '#FE762A', '#F9B793', '#E33F3F', '#F48787', '#ED44F0', '#F5ABF6', '#41616A', '#ADCDD6',
      ];
      res.data.forEach((item, index) => {
        let obj = {
          name: item.cargoType,
          value: item.rate,
          load: item.load,
          itemStyle: {
            color: colorData[index]
          }
        };
        seriesData.push(obj);
      });
      pieChartData1.value = seriesData;
      let pieChart = echarts.getInstanceByDom(document.getElementById("seventh-chart"));
      if (pieChart != null && pieChart != "" && pieChart != undefined) {
        pieChart.dispose();
      }
      pieChart = echarts.init(document.getElementById('seventh-chart'));
      let option;
      option = {
        graphic: {
          type: 'image',
          id: 'background',
          left: 50,
          top: 20,
          z: -10, // 确保背景图在底层
          bounding: 'raw',
          origin: [200, 200], // 图片的中心位置
          style: {
            image: chartBg, // 背景图片的URL
            width: 260, // 背景图片的宽度
            height: 260, // 背景图片的高度
          }
        },
        tooltip: {
          trigger: 'item',
          confine: true, //限制在图表区域内
          formatter: function (params) {
            return params.marker + params.data.name + ': ' + params.data.load + '吨，占比：' + params.data.value + '%'
          },
        },
        legend: {
          type: 'scroll',
          textStyle: {
            fontSize: "16px",
            color: "#FFFFFF",
          },
          pageIconColor: '#FFFFFF', // 翻页按钮的颜色
          pageIconInactiveColor: '#2f4554', // 翻页按钮不激活时（即翻页到头时）的颜色
          pageTextStyle: { // 图例页信息的文字样式
            color: '#FFFFFF'
          },
        },
        series: [
          {
            type: 'pie',
            radius: ['60%', '70%'],
            avoidLabelOverlap: false,
            label: {
              show: false,
              position: 'center'
            },
            data: seriesData
          }
        ]
      };
      option && pieChart.setOption(option);
    }
  });
};
const date1Change = () => {
  initPieChart1();
};

//水位变化统计
const waterLevelDate = ref('');
const waterAlysFunction = () => {
  nextTick(() => {
    waterAlys(shipLock.value, waterLevelDate.value).then((res) => {
      if (res.code === 200) {
        let xAxisData = [];
        let seriesData = [];
        res.data.forEach((item) => {
          xAxisData.push(item.logDate.slice(11, 16));
          seriesData.push(item.waterLevel);
        });
        let lineChart = echarts.getInstanceByDom(document.getElementById("eighth-chart"));
        if (lineChart != null && lineChart != "" && lineChart != undefined) {
          lineChart.dispose();
        }
        lineChart = echarts.init(document.getElementById('eighth-chart'));

        let option;
        option = {
          tooltip: {
            trigger: 'axis',
            confine: true, //限制在图表区域内
            formatter: function (params) {
              let template = `${params[0].axisValue}<br>`;
              for (let i = 0; i < params.length; i++) {
                let item = params[i];
                template += item.marker + '水位值: ' + item.value + 'm' + '<br>'
                // return params[x].data.name + ':' + params[x].data.value
              }
              return template
            },
          },
          grid: {
            top: '40px',
            left: '40px',
            right: '12%',
            bottom: '45px',
          },
          dataZoom: [
            {
              show: false,
              type: "inside",
              startValue: 0,
              endValue: 11,
              zoomLock: false,
            },
          ],
          xAxis: {
            type: 'category',
            name: '时间',
            data: xAxisData,
            nameTextStyle: {
              fontWeight: "500",
              fontSize: "16px",
              color: "#FFFFFF",
            },
            axisLabel: {
              interval: 0,
              // rotate: 60,
              color: "#FFFFFF",
              fontSize: "16px",
            },
          },
          yAxis: {
            type: 'value',
            name: '水位（m）',
            nameTextStyle: {
              fontWeight: "500",
              fontSize: "16px",
              color: "#FFFFFF",
            },
            axisLabel: {
              color: "#FFFFFF",
              fontSize: "16px",
            },
            splitLine: {
              show: true,
              lineStyle: {
                // type:'dashed',
                color: 'rgba(255,255,255,0.2)'
              }
            }
          },
          series: [
            {
              data: seriesData,
              type: 'line',
              itemStyle: {
                color: '#78DFFF'
              },
            }
          ],
        };
        option && lineChart.setOption(option);
      }
    });
  });
};
const waterLevelDateChange = () => {
  waterAlysFunction();
};

//获取船闸（连江）
const shipLock1 = ref([]);
const shipLockOptions1 = ref([]);
const getShipLockSmallFunction = () => {
  getShipLockSmall("连江").then((res) => {
    if (res.code === 200) {
      let data = [
        { label: "船闸", value: "船闸", children: [] },
        { label: "水坝", value: "水坝", children: [] }
      ];
      res.data.cz.forEach((item) => {
        data[0].children.push({
          label: item.name,
          value: item.name
        });
      });
      res.data.sb.forEach((item) => {
        data[1].children.push({
          label: item.name,
          value: item.name
        });
      });
      shipLockOptions1.value = data;
      shipLock1.value = [shipLockOptions1.value[0].value, shipLockOptions1.value[0].children[0].value];

      defInfoFn(); //监测点数据分析
      cycleStatisFunction(); //变形监测观测周期统计
      initVideo1(); //视频监控
      getCycListFunction(); //获取周期
    }
  });
};
const shipLock1Change = () => {
  defInfoFn(); //监测点数据分析
  cycleStatisFunction(); //变形监测观测周期统计
  videoDirectoryFunction1(); //视频监控
  getCycListFunction(); //获取周期
};

//变形监测分析
const radio1 = ref('监测点数据分析');
const radio1Change = () => {

};
const defInfoData = ref({});
const defInfoFn = () => {
  defInfo(shipLock1.value[1]).then((res) => {
    if (res.code === 200) {
      defInfoData.value = res.data;
    }
  });
};
const cycleStatisxAxisData = ref([]);
const cycleStatisseriesData = ref([]);
const cycleStatisFunction = () => {
  cycleStatis(shipLock1.value[1]).then((res) => {
    cycleStatisxAxisData.value = [];
    cycleStatisseriesData.value = [];
    if (res.code === 200) {
      nextTick(() => {
        res.data.forEach((item) => {
          cycleStatisxAxisData.value.push(item.time);
          cycleStatisseriesData.value.push(item.cyc);
        });

        let barChart = echarts.getInstanceByDom(document.getElementById("tenth-chart"));
        if (barChart == null) {
          barChart = echarts.init(document.getElementById("tenth-chart"));
        }
        let option;
        option = {
          tooltip: {
            trigger: "axis",
            axisPointer: {
              type: "shadow",
            },
            confine: true, //限制在图表区域内
            formatter: function (params) {
              let value = params[0].value + '次';
              return params[0].seriesName + '<br/>' + params[0].name + ' : ' + value;
            }
          },
          grid: {
            top: '40px',
            left: '40px',
            right: '12%',
            bottom: '45px',
            containLabel: true,
          },
          dataZoom: [
            {
              show: false,
              type: "inside",
              // maxValueSpan: 8,
              startValue: 0,
              endValue: 5,
              zoomLock: false,
            },
          ],
          xAxis: [
            {
              type: "category",
              data: cycleStatisxAxisData.value,
              name: "时间",
              // axisTick: {
              //   alignWithLabel: true, //控制刻度线是否与刻度标签对齐
              //   show: false, //是否显示刻度线
              // },
              nameTextStyle: {
                fontWeight: "500",
                fontSize: "16px",
                color: "#FFFFFF",
              },
              axisLabel: {
                interval: 0,
                // rotate: 60,
                color: "#FFFFFF",
                fontSize: "16px",
                // formatter: function (value) {
                //   //x轴的文字改为竖版显示
                //   var str = value.split("");
                //   return str.join("\n");
                // }
              },
            },
          ],
          yAxis: [
            {
              type: "value",
              name: '统计次数',
              nameTextStyle: {
                fontWeight: "500",
                fontSize: "16px",
                color: "#FFFFFF",
              },
              axisLabel: {
                color: "#FFFFFF",
                fontSize: "16px",
              },
              splitLine: {
                show: true,
                lineStyle: {
                  // type:'dashed',
                  color: 'rgba(255,255,255,0.2)'
                }
              }
            },
          ],
          series: [
            {
              name: "统计次数",
              data: cycleStatisseriesData.value,
              type: "bar",
              barWidth: 10,
              // label: {
              //   show: true,
              //   position: "top",
              // },
              itemStyle: {
                color: '#78DFFF'
              },
            },
          ],
        };

        option && barChart.setOption(option);
      });
    }
  });
};

//基本情况
const beijiangData = ref({});
const lianjiangData = ref({});
const countDataFn = () => {
  screenMapData().then((res) => {
    if (res.code === 200) {
      beijiangData.value = res.data[0].beijiang;
      lianjiangData.value = res.data[0].lianjiang;
    }
  });
};

//视频监控（北江）
const initVideo = () => {
  nextTick(() => {
    videojs("myVideo", {
      language: 'zh-CN',  //汉化
      autoplay: true, // true,浏览器准备好时开始播放
      loop: true, // 导致视频一结束就重新开始
      controls: true, //取消视频中的进度条
      muted: true, //是否静音
      preload: 'metadata', //auto浏览器选择最佳行为,立即开始加载视频（如果浏览器支持）      
      notSupportedMessage: '此视频暂无法播放，请稍后再试', // 无法播放媒体源时显示的默认信息
      textTrackDisplay: false,
      techOrder: ['html5', 'flash'],
      controlBar: {
        fullscreenToggle: false, //禁用全屏
      }
    });
  });
  videoDirectoryFunction();
};
const videoPoint = ref('');
const videoDirectoryData = ref([]);
const videoDirectoryFunction = () => {
  videoDirectory(shipLock.value).then((res) => {
    if (res.code === 200 && res.data.length) {
      videoDirectoryData.value = res.data;
      videoPoint.value = res.data[0].id;
      geVideotUrlFunction();
    } else {
      videoDirectoryData.value = [];
      videoPoint.value = "";
    }
  });
};
const geVideotUrlFunction = () => {
  geVideotUrl(videoPoint.value).then((res) => {
    if (res.code === 200 && res.data) {
      const myPlayer = videojs("myVideo");
      myPlayer.src([
        {
          type: 'application/x-mpegURL',
          src: res.data.url, //视频播放地址
        }
      ]);
      myPlayer.play();
    }
  });
};
const videoPointChange = () => {
  geVideotUrlFunction();
};

//视频监控（连江）
const initVideo1 = () => {
  nextTick(() => {
    videojs("myVideo1", {
      language: 'zh-CN',  //汉化
      autoplay: true, // true,浏览器准备好时开始播放
      loop: true, // 导致视频一结束就重新开始
      controls: true, //取消视频中的进度条
      muted: true, //是否静音
      preload: 'metadata', //auto浏览器选择最佳行为,立即开始加载视频（如果浏览器支持）      
      notSupportedMessage: '此视频暂无法播放，请稍后再试', // 无法播放媒体源时显示的默认信息
      textTrackDisplay: false,
      techOrder: ['html5', 'flash'],
      controlBar: {
        fullscreenToggle: false, //禁用全屏
      }
    });
  });
  videoDirectoryFunction1();
};
const videoPoint1 = ref('');
const videoDirectoryData1 = ref([]);
const videoDirectoryFunction1 = () => {
  videoDirectory(shipLock1.value[1]).then((res) => {
    if (res.code === 200 && res.data.length) {
      videoDirectoryData1.value = res.data;
      videoPoint1.value = res.data[0].id;
      geVideotUrlFunction1();
    } else {
      videoDirectoryData1.value = [];
      videoPoint1.value = "";
    }
  });
};
const geVideotUrlFunction1 = () => {
  geVideotUrl(videoPoint1.value).then((res) => {
    if (res.code === 200 && res.data) {
      const myPlayer = videojs("myVideo1");
      myPlayer.src([
        {
          type: 'application/x-mpegURL',
          src: res.data.url, //视频播放地址
        }
      ]);
      myPlayer.play();
    }
  });
};
const videoPointChange1 = () => {
  geVideotUrlFunction1();
};

//筛选（船闸）
const checkAll1 = ref(false);
const isIndeterminate1 = ref(false);
const checkedValues1 = ref([]);
const options1 = ['Ⅲ级', 'Ⅳ级', 'Ⅴ级', 'Ⅵ级'];
const handleCheckAllChange1 = (val) => {
  checkedValues1.value = val ? options1 : [];
  isIndeterminate1.value = false;
  handleSure();
};
const handleCheckedCitiesChange1 = (value) => {
  const checkedCount = value.length;
  checkAll1.value = checkedCount === options1.length;
  isIndeterminate1.value = checkedCount > 0 && checkedCount < options1.length;
  handleSure();
};
//筛选（航道）
const checkAll2 = ref(false);
const isIndeterminate2 = ref(false);
const checkedValues2 = ref([]);
const options2 = ['北江', '连江'];
const handleCheckAllChange2 = (val) => {
  checkedValues2.value = val ? options2 : [];
  isIndeterminate2.value = false;
  handleSure();
};
const handleCheckedCitiesChange2 = (value) => {
  const checkedCount = value.length;
  checkAll2.value = checkedCount === options2.length;
  isIndeterminate2.value = checkedCount > 0 && checkedCount < options2.length;
  handleSure();
};
//筛选（辖区）
const checkAll3 = ref(false);
const isIndeterminate3 = ref(false);
const checkedValues3 = ref([]);
const options3 = ['韶关', '清远'];
const handleCheckAllChange3 = (val) => {
  checkedValues3.value = val ? options3 : [];
  isIndeterminate3.value = false;
  handleSure();
};
const handleCheckedCitiesChange3 = (value) => {
  const checkedCount = value.length;
  checkAll3.value = checkedCount === options3.length;
  isIndeterminate3.value = checkedCount > 0 && checkedCount < options3.length;
  handleSure();
};
const handleSure = () => {
  OlArcRef.value.getPositionFn({
    slLevel: checkedValues1.value.join(','),
    hangdao: checkedValues2.value.join(','),
    block: checkedValues3.value.join(',')
  });
};

//变形监测统计分析
const currentActive = ref(1);
const currentActiveChange = (val) => {
  currentActive.value = val;
  singleType.value = "周期";
  if (val === 1) {
    defAylsFunction();
  } else {
    defSingleAylsFunction();
  }
};
const cycle = ref('');
const cycle1 = ref('周期');
const singleType = ref('周期');
const singleTypeData = [
  { text: '周期', value: '周期' },
  { text: '时间', value: '时间' },
];
const singleValue1 = ref('');
const singleValue2 = ref('');
const singleTime = ref([new Date().format("yyyy-MM-dd"), new Date().format("yyyy-MM-dd")]);
const cycleOptions = ref([]);
const currentType1 = ref("累积");
const changeType1 = (val) => {
  currentType1.value = val;
  defAylsFunction();
};
const currentType2 = ref("累积");
const changeType2 = (val) => {
  currentType2.value = val;
  defSingleAylsFunction();
};

const cycleChange = () => {
  defAylsFunction();
};
const singleValueChange = () => {
  defSingleAylsFunction();
};

const getCycListFunction = () => {
  getCycList(shipLock1.value[1]).then((res) => {
    if (res.code === 200) {
      res.data.forEach((item) => {
        item.cycName = `第${item.cyc}周期`;
      });
      cycleOptions.value = res.data;
      if (res.data.length) {
        cycle.value = res.data[0].cycName;
        singleValue1.value = res.data[3].cycName;
        singleValue2.value = res.data[0].cycName;
      } else {
        cycle.value = "";
        singleValue1.value = "";
        singleValue2.value = "";
      }
      defAylsFunction();
    }
  });
};
const pointName = ref('');
const pointNameData = ref([]);
const aylsXAxisData = ref([]);
const aylsSeriesData = ref([]);
const legendData = ref({});
const defAylsFunction = () => {
  defAyls(shipLock1.value[1], cycle.value.replace('第', '').replace('周期', '')).then((res) => {
    if (res.code === 200) {
      if (res.data.length) {
        let nData = [];
        let eData = [];
        let zData = [];
        let yujing1 = [];
        let yujing2 = [];

        let thisnData = [];
        let thiseData = [];
        let thiszData = [];
        pointNameData.value = [];
        aylsXAxisData.value = [];
        res.data.forEach((item) => {
          pointNameData.value.push(
            { text: item.pointName, value: item.pointName }
          );
          aylsXAxisData.value.push(item.pointName);
          nData.push(item.acDn);
          eData.push(item.acDe);
          zData.push(item.acDz);
          yujing1.push(30);
          yujing2.push(-30);
          thisnData.push(item.thisDn);
          thiseData.push(item.thisDe);
          thiszData.push(item.thisDz);
        });
        pointName.value = pointNameData.value[0].value;
        if (currentType1.value === "累积") {
          aylsSeriesData.value = [
            {
              name: '累积变化量N',
              type: 'line',
              //smooth: true,
              data: nData,
              lineStyle: {
                color: '#78DFFF',
              },
            },
            {
              name: '累积变化量E',
              type: 'line',
              //smooth: true,
              data: eData,
              lineStyle: {
                color: '#5AF5D5',
              },
            },
            {
              name: '累积变化量Z',
              type: 'line',
              //smooth: true,
              data: zData,
              lineStyle: {
                color: '#FFC733',
              },
            },
            {
              name: '预警值',
              type: 'line',
              data: yujing1,
              showSymbol: false,
              lineStyle: {
                color: '#F13939',
                width: 1,
                type: 'dashed'
              },
            },
            {
              name: '预警值',
              type: 'line',
              data: yujing2,
              showSymbol: false,
              lineStyle: {
                color: '#F13939',
                width: 1,
                type: 'dashed'
              },
            }
          ];
          legendData.value = {
            data: ['累积变化量N', '累积变化量E', '累积变化量Z', '预警值', '预警值'],
            textStyle: {
              color: 'rgba(255,255,255,0.85)'
            }
          };
        } else if (currentType1.value === "本次") {
          aylsSeriesData.value = [
            {
              name: '本次变化量N',
              type: 'line',
              //smooth: true,
              data: thisnData,
              lineStyle: {
                color: '#78DFFF',
              },
            },
            {
              name: '本次变化量E',
              type: 'line',
              //smooth: true,
              data: thiseData,
              lineStyle: {
                color: '#5AF5D5',
              },
            },
            {
              name: '本次变化量Z',
              type: 'line',
              //smooth: true,
              data: thiszData,
              lineStyle: {
                color: '#FFC733',
              },
            }
          ];
          legendData.value = {
            data: ['本次变化量N', '本次变化量E', '本次变化量Z'],
            textStyle: {
              color: 'rgba(255,255,255,0.85)'
            }
          };
        }

        initLineChart1();
      } else {
        pointNameData.value = [];
        pointName.value = "";

        aylsXAxisData.value = [];
        aylsSeriesData.value = [];
        initLineChart1();
      }
    }
  });
};
const defSingleAylsFunction = () => {
  defSingleAyls(
    singleType.value === '周期' ? singleValue1.value.replace('第', '').replace('周期', '') : singleTime.value[0],
    singleType.value === '周期' ? singleValue2.value.replace('第', '').replace('周期', '') : singleTime.value[1],
    singleType.value === '周期' ? 1 : 2,
    pointName.value,
    shipLock1.value[1]
  ).then((res) => {
    if (res.code === 200) {
      let nData = [];
      let eData = [];
      let zData = [];
      let yujing1 = [];
      let yujing2 = [];

      let thisnData = [];
      let thiseData = [];
      let thiszData = [];
      aylsXAxisData.value = [];
      res.data.forEach((item) => {
        if (singleType.value === 2) {
          aylsXAxisData.value.push(item.createTime);
        } else {
          aylsXAxisData.value.push(item.cyc);
        }

        nData.push(item.acDn);
        eData.push(item.acDe);
        zData.push(item.acDz);
        yujing1.push(30);
        yujing2.push(-30);
        thisnData.push(item.thisDn);
        thiseData.push(item.thisDe);
        thiszData.push(item.thisDz);
      });

      if (currentType2.value === "累积") {
        aylsSeriesData.value = [
          {
            name: '累积变化量N',
            type: 'line',
            //smooth: true,
            data: nData,
            lineStyle: {
              color: '#78DFFF',
            },
          },
          {
            name: '累积变化量E',
            type: 'line',
            //smooth: true,
            data: eData,
            lineStyle: {
              color: '#5AF5D5',
            },
          },
          {
            name: '累积变化量Z',
            type: 'line',
            //smooth: true,
            data: zData,
            lineStyle: {
              color: '#FFC733',
            },
          },
          {
            name: '预警值',
            type: 'line',
            data: yujing1,
            showSymbol: false,
            lineStyle: {
              color: '#F13939',
              width: 1,
              type: 'dashed'
            },
          },
          {
            name: '预警值',
            type: 'line',
            data: yujing2,
            showSymbol: false,
            lineStyle: {
              color: '#F13939',
              width: 1,
              type: 'dashed'
            },
          }
        ];
        legendData.value = {
          data: ['累积变化量N', '累积变化量E', '累积变化量Z', '预警值', '预警值'],
          textStyle: {
            color: 'rgba(255,255,255,0.85)'
          }
        };
      } else if (currentType2.value === "本次") {
        aylsSeriesData.value = [
          {
            name: '本次变化量N',
            type: 'line',
            //smooth: true,
            data: thisnData,
            lineStyle: {
              color: '#78DFFF',
            },
          },
          {
            name: '本次变化量E',
            type: 'line',
            //smooth: true,
            data: thiseData,
            lineStyle: {
              color: '#5AF5D5',
            },
          },
          {
            name: '本次变化量Z',
            type: 'line',
            //smooth: true,
            data: thiszData,
            lineStyle: {
              color: '#FFC733',
            },
          }
        ];
        legendData.value = {
          data: ['本次变化量N', '本次变化量E', '本次变化量Z'],
          textStyle: {
            color: 'rgba(255,255,255,0.85)'
          }
        };
      }
      initLineChart1();
    }
  });
};
const initLineChart1 = () => {
  nextTick(() => {
    let lineChart = echarts.getInstanceByDom(document.getElementById("ninth-chart"));
    if (lineChart != null && lineChart != "" && lineChart != undefined) {
      lineChart.dispose();
    }
    lineChart = echarts.init(document.getElementById('ninth-chart'));
    let option;
    option = {
      grid: {
        top: '25%',
        left: '40px',
        right: '15px',
        bottom: '40px',
      },
      tooltip: {
        trigger: 'axis',
        confine: true, //限制在图表区域内

        formatter: function (params) {
          let template = `<b>${params[0].axisValue}</b><br>`;
          for (let i = 0; i < 3; i++) {
            let item = params[i];
            template += item.marker + item.seriesName + ': ' + `<b style="float:right;padding-left: 20px;">${item.data}mm</b><br>`
          }
          return template
        },
      },
      legend: legendData.value,
      xAxis: {
        type: 'category',
        data: aylsXAxisData.value,
        axisLabel: {
          interval: 0,
          color: "#FFFFFF",
          fontSize: "16px",
        },
        nameTextStyle: {
          fontWeight: "500",
          fontSize: "16px",
          color: "#FFFFFF",
        },
        axisLine: {
          onZero: true // 将X轴在Y轴0刻度的位置固定
        }
      },
      yAxis: {
        type: 'value',
        name: '单位：mm',
        axisLabel: {
          interval: 0,
          color: "#FFFFFF",
          fontSize: "16px",
        },
        nameTextStyle: {
          fontWeight: "500",
          fontSize: "16px",
          color: "#FFFFFF",
        },
        splitLine: {
          show: true,
          lineStyle: {
            // type:'dashed',
            color: 'rgba(255,255,255,0.2)'
          }
        }
      },
      series: aylsSeriesData.value
    };

    option && lineChart.setOption(option);
  });
};

//是否显示iframe
const isShow = ref(false);

onMounted(() => {
  waterLevelDate.value = new Date().format('yyyy-MM-dd');
  newWaterFunctin(); //实时水位统计分析
  initStackedChart(); //过闸船舶货物吨位统计
  initPieChart(); //过闸船舶货物类型统计分析
  deformationAlysFunction(); //变形监测统计分析
  circleAlysFunction(); //变形监测观测周期统计分析
  getShipLockFunction(); //获取船闸（北江）       
  getShipLockSmallFunction(); //获取船闸（连江） 
  countDataFn(); //基本情况    
});

</script>

<style lang="scss" scoped>
@font-face {
  font-family: Din;
  src: url("../assets/fonts/din.ttf");
}
@font-face {
  font-family: Tx;
  src: url("../assets/fonts/tx.ttf");
}
.container {
  width: 6600px;
  height: 1200px;
  transform-origin: 0 0;
  position: relative;
  background: #012138;
  .main {
    width: 100%;
    height: 100%;
    position: absolute;
    .header {
      height: 80px;
      line-height: 80px;
      background-image: url("../assets/images/big-screen/header-bg.png");
      background-size: 100% 100%;
      background-repeat: no-repeat;
      .title {
        font-size: 40px;
        font-weight: 500;
        text-shadow: 0px 5px 5px rgba(0, 0, 0, 0.25);
        text-align: center;
        background: linear-gradient(180deg, #ffffff 0%, #78dfff 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
      }
    }
    .content {
      display: flex;
      box-sizing: content-box;
      .left-content {
        width: 2200px;
        .item-content {
          height: 520px;
          box-sizing: content-box;
          background-color: #06324f;
          .item-content-title {
            background-image: url("../assets/images/big-screen/one-title-bg.png");
            background-size: 100% 100%;
            background-repeat: no-repeat;
            font-family: "Tx";
            color: #fff;
            font-size: 26px;
            font-weight: 400;
            height: 40px;
            line-height: 40px;
            padding: 8px 0px 8px 28px;
            display: flex;
            align-items: center;
            justify-content: space-between;
          }
          .item {
            .top {
              background-image: url("../assets/images/big-screen/two-title-bg.png");
              background-size: 100% 100%;
              background-repeat: no-repeat;
              display: flex;
              justify-content: space-between;
              align-items: center;
              padding: 7px 0px;
              margin-bottom: 24px;
              .title {
                font-family: "Tx";
                font-size: 24px;
                color: #fff;
                padding-left: 32px;
              }
              .time {
                font-size: 18px;
                color: #bebebe;
              }
              .no-active {
                font-size: 24px;
                color: rgba(255, 255, 255, 0.65);
              }
            }
            .count {
              display: flex;
              justify-content: space-around;
              align-items: center;
              margin-top: 8px;
              height: 44px;
              .count-item {
                display: flex;
                align-items: center;
                .name {
                  font-size: 16px;
                  font-weight: 500;
                  color: #fff;
                }
                .value {
                  font-family: "Din";
                  font-size: 28px;
                  font-weight: bold;
                  color: #fff;
                  padding-left: 8px;
                }
              }
            }
            .pie-table {
              height: 120px;
              overflow-y: scroll;
              padding: 0 16px;
              .pie-tbody {
                font-size: 14px;
                font-weight: 500;
                color: #fff;
                .pie-tr {
                  display: flex;
                  align-items: center;
                  justify-content: space-around;
                  .li {
                    width: 8px;
                    height: 8px;
                    border-radius: 0px 0px 0px 0px;
                    opacity: 1;
                    border-radius: 50%;
                    margin-right: 6px;
                  }
                }
              }
            }
            .tab-content {
              .date {
                font-weight: 400;
                font-size: 18px;
                color: rgba(255, 255, 255, 0.65);
                height: 44px;
                line-height: 44px;
                margin-top: 8px;
              }
              .radio-value {
                height: 28px;
                text-align: center;
              }
              #sixth-chart {
                height: 280px;
              }
              #seventh-chart {
                height: 300px;
                width: 360px;
              }
              #eighth-chart {
                height: 320px;
                width: 1020px;
              }
            }
            .no-video {
              display: flex;
              justify-content: center;
              align-items: center;
              height: 352px;
              flex-direction: column;
              .default-img {
                img {
                  height: 100px;
                  width: 200px;
                }
              }
              .default-text {
                color: #fff;
                font-size: 16px;
                margin-top: 8px;
              }
            }
            #first-chart {
              height: 352px;
              width: 100%;
            }
            #second-chart {
              height: 300px;
              width: 100%;
            }
            #third-chart {
              height: 220px;
              width: 100%;
            }
          }
        }
      }
      .centre-content {
        width: 2200px;
        height: 1080px;
        margin: 40px 0px;
        position: relative;
        .special-topic {
          position: absolute;
          top: 42px;
          left: 10px;
          font-family: "Tx";
          font-weight: 400;
          font-size: 18px;
          color: #ffffff;
          .topic {
            width: 286px;
            height: 40px;
            background-image: url("../assets/images/big-screen/topic-bg.png");
            background-size: 100% 100%;
            background-repeat: no-repeat;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 24px;
            color: rgba(255, 255, 255, 0.65);
          }
          .topic:hover {
            width: 286px;
            height: 40px;
            background-image: url("../assets/images/big-screen/topic-active-bg.png");
            background-size: 100% 100%;
            background-repeat: no-repeat;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 24px;
          }
          .topic-active {
            width: 286px;
            height: 40px;
            background-image: url("../assets/images/big-screen/topic-active-bg.png");
            background-size: 100% 100%;
            background-repeat: no-repeat;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 24px;
          }
        }
        .legend {
          width: 288px;
          height: 122px;
          background: rgba(5, 48, 68, 0.8);
          border-radius: 0px 0px 0px 0px;
          border: 1px solid rgba(120, 223, 255, 0.4);
          position: absolute;
          top: 42px;
          right: 10px;
          .legend-item {
            display: flex;
            align-items: center;
            font-size: 18px;
            font-weight: 400;
            color: #fff;
            margin: 20px 0px 20px 24px;
            img {
              width: 26px;
              height: 26px;
              padding-right: 8px;
            }
          }
        }
        .filter {
          height: 450px;
          width: 288px;
          box-sizing: content-box;
          background: rgba(5, 48, 68, 0.8);
          border-radius: 0px 0px 0px 0px;
          border: 1px solid rgba(120, 223, 255, 0.4);
          position: absolute;
          top: 180px;
          right: 10px;
          .filter-item {
            .name {
              color: #78dfff;
              font-size: 16px;
              font-weight: bold;
            }
          }
        }
        .statistics {
          position: absolute;
          top: 646px;
          right: 10px;
          .statistics-item {
            height: 146px;
            width: 288px;
            background: rgba(5, 48, 68, 0.8);
            border-radius: 0px 0px 0px 0px;
            border: 1px solid rgba(120, 223, 255, 0.4);
            color: #fff;
            font-size: 18px;
            font-weight: 400;
            .top-info {
              margin: 20px 0px 8px 24px;
            }
            .bottom-info {
              display: flex;
              margin: 0px 24px 20px 24px;
              .value {
                font-size: 28px;
                margin-top: 4px;
              }
            }
          }
        }
      }
      .right-content {
        width: 2200px;
        .item-content {
          height: 520px;
          box-sizing: content-box;
          background-color: #06324f;
          .item-content-title {
            background-image: url("../assets/images/big-screen/one-title-bg.png");
            background-size: 100% 100%;
            background-repeat: no-repeat;
            font-family: "Tx";
            color: #fff;
            font-size: 26px;
            font-weight: 400;
            height: 40px;
            line-height: 40px;
            padding: 8px 0px 8px 28px;
            display: flex;
            align-items: center;
            justify-content: space-between;
          }
          .item {
            width: 50%;
            .top {
              background-image: url("../assets/images/big-screen/two-title-bg.png");
              background-size: 100% 100%;
              background-repeat: no-repeat;
              display: flex;
              justify-content: space-between;
              align-items: center;
              padding: 7px 0px;
              margin-bottom: 24px;
              .title {
                font-family: "Tx";
                font-size: 24px;
                color: #fff;
                padding-left: 32px;
              }
              .time {
                font-size: 18px;
                color: #bebebe;
              }
            }
            .list {
              height: 352px;
              overflow-y: scroll;
              box-sizing: content-box;
              display: flex;
              flex-wrap: wrap;
              .list-item {
                width: 48%;
                margin: 0 1%;
                .item-title {
                  font-weight: 800;
                  font-size: 16px;
                  color: #78dfff;
                  background: #164966;
                  text-align: center;
                  padding: 2px 0;
                }
                .item-name {
                  display: flex;
                  div {
                    width: 25%;
                    padding: 2px 0;
                    font-weight: 500;
                    font-size: 14px;
                    color: #ffffff;
                    background: #225a78;
                    text-align: center;
                  }
                }
                .item-value {
                  display: flex;
                  div {
                    width: 25%;
                    padding: 2px 0;
                    font-weight: 400;
                    font-size: 14px;
                    color: #ffffff;
                    background: #10405d;
                    text-align: center;
                  }
                }
              }
            }
            .tabs-content {
              height: 352px;
              box-sizing: content-box;
              .radio-tab {
                height: 52px;
                text-align: center;
              }
              #fourth-chart,
              #fifth-chart {
                height: 300px;
              }
              #tenth-chart {
                height: 352px;
                width: 1000px;
              }
              .point-statistics {
                .point-item {
                  background-image: url("../assets/images/big-screen/bg.png");
                  background-size: 100% 100%;
                  background-repeat: no-repeat;
                  width: 500px;
                  .top-part {
                    margin: 30px 0px 24px 24px;
                    display: flex;
                    align-items: center;
                    font-weight: 500;
                    font-size: 18px;
                    color: #ffffff;
                    .ml16 {
                      margin-left: 16px;
                    }
                    .value {
                      font-family: "Din";
                      font-weight: bold;
                      font-size: 28px;
                      color: #ffffff;
                    }
                    .name {
                      font-weight: bold;
                      font-size: 28px;
                      color: #ffffff;
                      margin-left: 8px;
                    }
                  }
                  .bottom-part {
                    margin: 0px 0px 24px 24px;
                    display: flex;
                    .name {
                      font-weight: 500;
                      font-size: 16px;
                      color: #ffffff;
                    }
                    .value {
                      font-family: "Din";
                      font-weight: bold;
                      font-size: 28px;
                      color: #ffffff;
                    }
                    .mr60 {
                      margin-right: 60px;
                    }
                  }
                }
                .h195 {
                  height: 195px;
                }
                .h125 {
                  height: 130px;
                }
                .mr24 {
                  margin-right: 24px;
                }
              }
              .analysis {
                .top-part {
                  display: flex;
                  .btn-group {
                    display: flex;
                    justify-content: center;
                    margin-right: 16px;
                    .btn {
                      padding: 8px;
                      color: #fff;
                      border: 1px solid #fff;
                    }
                    .active {
                      color: #262626;
                      background-color: #78dfff;
                      border: 1px solid #78dfff;
                    }
                  }
                  .my-btn {
                    display: flex;
                    margin-left: 16px;
                    .btn {
                      margin-right: 5px;
                      color: #ffffff;
                      border: 1px solid #fff;
                      padding: 0 8px;
                      display: flex;
                      align-items: center;
                    }
                    .active {
                      color: #262626;
                      background-color: #78dfff;
                      border: 1px solid #78dfff;
                    }
                  }
                }
              }
            }
            .no-video {
              display: flex;
              justify-content: center;
              align-items: center;
              height: 352px;
              flex-direction: column;
              .default-img {
                img {
                  height: 100px;
                  width: 200px;
                }
              }
              .default-text {
                color: #fff;
                font-size: 16px;
                margin-top: 8px;
              }
            }
          }
        }
      }
    }
    .my-iframe {
      .close-btn {
        font-family: "Tx";
        position: absolute;
        top: 40px;
        left: 1940px;
        color: #ffffff;
        font-size: 20px;
        background-image: url("../assets/images/big-screen/back-bg.png");
        background-size: 100% 100%;
        background-repeat: no-repeat;
        width: 236px;
        height: 44px;
        line-height: 44px;
        text-align: center;
      }
    }
  }
}

// 表单样式
:deep(.el-form-item__label) {
  color: #06283e;
}
:deep(.el-input__inner) {
  color: #78dfff;
  background: transparent;
}
:deep(.el-input__wrapper) {
  background-color: transparent;
  box-shadow: 0 0 0 1px #06283e inset;
}
:deep(.el-range-editor--small .el-range-separator) {
  color: #78dfff;
}
:deep(.el-input__inner::placeholder) {
  color: #78dfff;
}
:deep(.el-select .el-input .el-select__caret.el-icon) {
  color: #78dfff;
}
:deep(.el-date-editor .el-range__icon) {
  color: #78dfff;
}
:deep(.el-range-input::placeholder) {
  color: #78dfff;
}
:deep(.el-range-editor--small .el-range-input) {
  color: #78dfff;
}
:deep(.el-cascader .el-input .el-input__suffix-inner .el-icon svg) {
  color: #78dfff;
}
:deep(.el-radio-button__inner) {
  color: #fff;
  background: transparent;
  border: 1px solid #d9d9d9;
}
:deep(.el-radio-button__original-radio:checked + .el-radio-button__inner) {
  color: #262626;
  background-color: #78dfff;
  border: 1px solid #78dfff;
}
:deep(.el-checkbox) {
  font-weight: 400;
  --el-checkbox-font-size: 18px;
  // color: rgba(255,255,255,0.65);
  color: #fff;
}
:deep(.el-checkbox__inner) {
  background-color: #d8d8d8;
}
:deep(.el-checkbox__input.is-checked + .el-checkbox__label) {
  color: #78dfff;
}
:deep(.el-checkbox__input.is-indeterminate .el-checkbox__inner) {
  background-color: #78dfff;
  border-color: #78dfff;
}
:deep(.el-checkbox__input.is-checked .el-checkbox__inner) {
  background-color: #78dfff;
  border-color: #78dfff;
}
:deep(.el-checkbox__inner::after) {
  box-sizing: content-box;
  content: "";
  border: 1px solid black;
  border-left: 0;
  border-top: 0;
  height: 7px;
  left: 4px;
  position: absolute;
  top: 1px;
  transform: rotate(45deg) scaleY(0);
  width: 3px;
  transition: transform 0.15s ease-in 50ms;
  transform-origin: center;
}
:deep(.el-checkbox__input.is-indeterminate .el-checkbox__inner::before) {
  content: "";
  position: absolute;
  display: block;
  background-color: black;
  height: 2px;
  transform: scale(0.5);
  left: 0;
  right: 0;
  top: 5px;
}
:deep(.el-date-editor .el-range__icon) {
  display: none;
}
:deep(.el-input.is-disabled .el-input__wrapper) {
  background-color: transparent;
  box-shadow: 0 0 0 1px #06283e inset;
}
:deep(.el-input.is-disabled .el-input__inner) {
  -webkit-text-fill-color: #78dfff;
}
:deep(.el-date-editor .el-range-input) {
  color: #78dfff;
}
:deep(.el-date-editor .el-range-separator) {
  color: #78dfff;
}
:deep(.el-input__prefix) {
  display: none;
}
//滚动条样式
::-webkit-scrollbar {
  width: 0px !important;
}
</style>